using System.ComponentModel.DataAnnotations;

namespace OutpatientApi.DTO
{
    /// <summary>
    /// 新增病人挂号参数数据传输对象
    /// </summary>
    public class AddPatientRegistrationDto
    {
        /// <summary>
        /// 挂号单编号
        /// </summary>
        [Required(ErrorMessage = "挂号单编号不能为空")]
        [StringLength(20, ErrorMessage = "挂号单编号长度不能超过20个字符")]
        public string RegisterNo { get; set; } = string.Empty;

        /// <summary>
        /// 挂号类别ID
        /// </summary>
        [Required(ErrorMessage = "挂号类别不能为空")]
        public int RegisterTypeId { get; set; }

        /// <summary>
        /// 就诊医生ID
        /// </summary>
        [Required(ErrorMessage = "就诊医生不能为空")]
        public int DoctorId { get; set; }

        /// <summary>
        /// 患者就诊卡号
        /// </summary>
        [StringLength(50, ErrorMessage = "就诊卡号长度不能超过50个字符")]
        public string CardNo { get; set; } = string.Empty;

        /// <summary>
        /// 就诊科室ID
        /// </summary>
        [Required(ErrorMessage = "就诊科室不能为空")]
        public int DepartmentId { get; set; }

        /// <summary>
        /// 挂号费用
        /// </summary>
        [Required(ErrorMessage = "挂号费用不能为空")]
        [Range(0, double.MaxValue, ErrorMessage = "挂号费用必须大于等于0")]
        public decimal RegisterFee { get; set; }

        /// <summary>
        /// 其他相关费用
        /// </summary>
        [Range(0, double.MaxValue, ErrorMessage = "其他费用必须大于等于0")]
        public decimal OtherFee { get; set; }

        /// <summary>
        /// 挂号日期
        /// </summary>
        [Required(ErrorMessage = "挂号日期不能为空")]
        public DateTime RegisterDate { get; set; }

        /// <summary>
        /// 实际就诊日期
        /// </summary>
        [Required(ErrorMessage = "就诊日期不能为空")]
        public DateTime VisitDate { get; set; }

        /// <summary>
        /// 患者姓名
        /// </summary>
        [Required(ErrorMessage = "患者姓名不能为空")]
        [StringLength(50, ErrorMessage = "患者姓名长度不能超过50个字符")]
        public string PatientName { get; set; } = string.Empty;

        /// <summary>
        /// 患者身份证号码
        /// </summary>
        [StringLength(18, ErrorMessage = "身份证号码长度不能超过18个字符")]
        public string IDNumber { get; set; } = string.Empty;

        /// <summary>
        /// 患者年龄
        /// </summary>
        [Range(0, 150, ErrorMessage = "年龄必须在0-150之间")]
        public int Age { get; set; }

        /// <summary>
        /// 患者详细住址
        /// </summary>
        [StringLength(200, ErrorMessage = "住址长度不能超过200个字符")]
        public string Address { get; set; } = string.Empty;

        /// <summary>
        /// 患者联系电话
        /// </summary>
        [StringLength(20, ErrorMessage = "联系电话长度不能超过20个字符")]
        public string PhoneNumber { get; set; } = string.Empty;

        /// <summary>
        /// 患者所属民族
        /// </summary>
        [StringLength(20, ErrorMessage = "民族长度不能超过20个字符")]
        public string Ethnicity { get; set; } = string.Empty;

        /// <summary>
        /// 患者文化程度
        /// </summary>
        [StringLength(50, ErrorMessage = "文化程度长度不能超过50个字符")]
        public string EducationLevel { get; set; } = string.Empty;

        /// <summary>
        /// 患者职业
        /// </summary>
        [StringLength(50, ErrorMessage = "职业长度不能超过50个字符")]
        public string Occupation { get; set; } = string.Empty;

        /// <summary>
        /// 患者住址邮政编码
        /// </summary>
        [StringLength(10, ErrorMessage = "邮政编码长度不能超过10个字符")]
        public string PostalCode { get; set; } = string.Empty;

        /// <summary>
        /// 患者婚姻状况 - true=已婚, false=未婚
        /// </summary>
        public bool MaritalStatus { get; set; }

        /// <summary>
        /// 患者性别 - true=男, false=女
        /// </summary>
        public bool Gender { get; set; }

        /// <summary>
        /// 患者出生日期
        /// </summary>
        [Required(ErrorMessage = "出生日期不能为空")]
        public DateTime DateOfBirth { get; set; }
    }
} 